home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.xa.undo;
-
- import com.extensibility.app.UI;
- import com.extensibility.xa.PIModel;
- import com.extensibility.xa.XADesktop;
- import com.extensibility.xml.BaseDeclaration;
- import com.extensibility.xml.ProcessingInstruction;
-
- public class PIInstructionUndoable extends DeclTableUndoable {
- ProcessingInstruction piDecl;
-
- public PIInstructionUndoable(PIModel var1, BaseDeclaration var2, Object var3) {
- super(XADesktop.getTableForModel(var1), var2, var3);
- this.piDecl = (ProcessingInstruction)var2;
- super.oldValue = ((PIModel)super.tableModel).getValueAt(super.tableModel.getRowForDecl(this.piDecl), 3);
- }
-
- public String getPresentationName() {
- return UI.getString("undo.pi.instruction");
- }
-
- public void undo() {
- super.undo();
- String var1 = super.oldValue == null ? "" : (String)super.oldValue;
- this.piDecl.setInstruction(var1);
- ((DeclTableUndoable)this).setCellFocus(super.tableModel.getRowForDecl(this.piDecl), 3);
- }
-
- public void doCommand() {
- this.piDecl.setInstruction((String)super.newValue);
- }
-
- public void redo() {
- super.redo();
- this.doCommand();
- ((DeclTableUndoable)this).setCellFocus(super.tableModel.getRowForDecl(this.piDecl), 3);
- }
- }
-